package com.ylx.excel.config;

import com.ylx.excel.excel.model.SyncExcelData;

import java.util.ArrayList;
import java.util.List;

/**
 * 多线程读取Excel的ThreadLocal
 * @author yanglixin
 */
public class SyncExcelThreadLocal {

    private static final ThreadLocal<List<SyncExcelData>> DATA = ThreadLocal.withInitial(ArrayList::new);

    public static List<SyncExcelData> getData() {
        return DATA.get();
    }

    public static void remove() {
        DATA.remove();
    }
}
